<tagLib name="strends" />
<include file="Public:header" />
<div class="handle-btns">
	<strends:linkBtn text="{%RETURN_LIST}" href="{:Cookie::get('returnUrl')}" />
</div>
<form method='post' id="form" name="form" action="{:U(MODULE_NAME.'/update')}" enctype="multipart/form-data">
<table cellpadding="4" cellspacing="0" border="0" class="table-form">
	<tr>
		<th width="150">{%TITLE}</th>
		<td><input type="text" class="textinput requireinput" name="title" value="{$vo.title}" /></td>
	</tr>
	<tr>
		<th width="150">发送人</th>
		<td><input type="text" class="textinput requireinput" name="uname" value="{$vo.uname}" /></td>
	</tr>
	<tr class="content">
		<th>{%CONTENT}</th>
		<td>
			<textarea name="content" class="textinput areainput" rows="5">{$vo.content}</textarea>
		</td>
	</tr>
	<tr class="content">
		<th>类型</th>
		<td>
			<input type="radio" value="1" name="type" onclick="showlist(1)" <if condition ="$vo.type eq 1">checked=checked</if>>全部&nbsp;&nbsp;
			<input type="radio" value="0" name="type" onclick="showlist(2)" <if condition ="$vo.type eq 0">checked=checked</if>>选择
		</td>
	</tr>
	<tr class="ulist" <if condition ="$vo.type eq 1">style="display:none;"</if>>
		<th>网红</th>
		<td>
			<foreach name="list" item="item">
			<input type="checkbox" value="{$item.uid}" name="ulist[]" <if condition="in_array($item['uid'],$u_arr)"> 
checked=checked</if>>{$item.user_name}&nbsp;&nbsp;
			</foreach>
		</td>
	</tr>
	<tr class="act">
		<th>&nbsp;</th>
		<td>
			<input type="hidden" name="id" value="{$vo.id}" />
			<input type="submit" class="submit_btn" value="{%SUBMIT}" />
			<input type="reset" class="reset_btn" value="{%RESET}" />
		</td>
	</tr>
</table>
</form>
<script>
	function showlist(type){
		if(type==2){
			$(".ulist").show();
		}else{
			$(".ulist").hide();
		}
	}
</script>
<include file="Public:footer" />